package com.jk.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.redis.serializer.StringRedisSerializer;

import java.io.Serializable;
/*1* @Return *
2* @Author: lxb
3* @Description:
4* @Date: 2022/11/2 15:43
5 * @param null
6:
**/

@TableName("product")
@Data
@Document(indexName = "product")
public class ProductEntity implements Serializable {

    @TableId(type = IdType.AUTO)
    @Id
    @Field(type = FieldType.Integer)
    private Integer id;

    private Double price;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String proname;
    private Integer surpluscount;//库存
    private Integer type;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String proimg;
    private String products;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String definite;
    private String brand;
    @TableField(exist = false)
    private String ids;
    private Integer buycount;//购买数量
    private String goods_state;
    @TableField(exist = false)
    private String typeName;

    private  Integer      productprice;//商品是否货到付款
    private  Integer      productcount;//商品售出数量


    private Integer status;
    @TableField(exist = false)
private Integer userId;

    //价格区间查
    @TableField(exist = false)
    private Double MaxPrice;
    @TableField(exist = false)
    private Double MinPrice;


}
